package com.zhkj.framework.controller;

import com.zhkj.framework.domain.Person;
import com.zhkj.framework.result.ResultVO;
import com.zhkj.framework.service.PersonService;
import com.zhkj.framework.utils.ResultVOUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Auther: zhangy
 * @Date: 2018/10/30 10:21
 * @Description:
 */
@RestController
public class PersonController {

    @Autowired
    private PersonService personService;

    @GetMapping("person")
    public ResultVO findPerson(@RequestParam(value = "personId") Integer personId){

        Person person = personService.findOne(personId);

        return ResultVOUtil.success(person);
    }
}
